{%- extends "base.html" %}

{%- block title %}
{% trans %}Global administrators{% endtrans %}
{%- endblock %}

{%- block main_action %}
<a class="btn btn-primary float-right" href="{{ url_for('.admin_create') }}">
  {% trans %}Add administrator{% endtrans %}
</a>
{%- endblock %}

{%- block content %}
{%- call macros.table(order='[[1,"asc"]]') %}
<thead>
  <tr>
    <th data-orderable="false">{% trans %}Actions{% endtrans %}</th>
    <th>{% trans %}Email{% endtrans %}</th>
  </tr>
</thead>
<tbody>
  {%- for admin in admins %}
  <tr>
    <td>
      <a href="{{ url_for('.user_edit', user_email=admin.email) }}" title="{% trans %}Edit{% endtrans %}"><i class="fas fa-pencil-alt"></i></a>&nbsp;
      <a href="{{ url_for('.admin_delete', admin=admin.email) }}" title="{% trans %}Delete{% endtrans %}"><i class="fa fa-trash"></i></a>
    </td>
    <td>{{ admin }}</td>
  </tr>
  {%- endfor %}
</tbody>
{%- endcall %}
{%- endblock %}
